package cn.com.xjnt.vas.ordering.domain.entity;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import cn.com.xjnt.vas.manage.domain.entity.Organization;

/**
 * The persistent class for the ordering_seller_discount database table.
 * 
 */
@Entity
@Table(name = "ordering_seller_discount")
@NamedQuery(name = "SellerDiscount.findAll", query = "SELECT s FROM SellerDiscount s")
public class SellerDiscount extends com.frameworks.core.entity.IdEntity {
    private static final long serialVersionUID = 1L;

    private String code;

    private float discount;

    private String name;

    // bi-directional many-to-one association to FoodSeller
    @ManyToOne
    @JoinColumn(name = "food_seller_id")
    private FoodSeller foodSeller;

    @ManyToOne
    @JoinColumn(name="organization_id")
    private Organization organization;
    
    public SellerDiscount() {
    }

    public String getCode() {
        return this.code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public float getDiscount() {
        return this.discount;
    }

    public void setDiscount(float discount) {
        this.discount = discount;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public FoodSeller getFoodSeller() {
        return foodSeller;
    }

    public void setFoodSeller(FoodSeller foodSeller) {
        this.foodSeller = foodSeller;
    }

    public Organization getOrganization() {
        return organization;
    }

    public void setOrganization(Organization organization) {
        this.organization = organization;
    }
}